﻿<%@ Application Language="C#" %>
<%@ Import Namespace="SemiCASE.DataType.Common.Logging" %>

<script RunAt="server">

    void Application_Start(object sender, EventArgs e)
    {
        // Code that runs on application startup

    }

    void Application_End(object sender, EventArgs e)
    {
        //  Code that runs on application shutdown

    }

    void Application_Error(object sender, EventArgs e)
    {
        /*
        try
        {
            string kullaniciSicil = String.Empty;
            if (Session["Kullanici"] != null && !String.IsNullOrEmpty(Session["Kullanici"].ToString()))
                kullaniciSicil = Session["Kullanici"].ToString();
            else
                kullaniciSicil = "Kullanici Alınamadı.";

            string pcname = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName.Split(new Char[] { '.' })[0];
            LogWriter log = new LogWriter();
            log.Write("SemiCASE", System.Diagnostics.EventLogEntryType.Error, Server.GetLastError(), HttpContext.Current.Request.ServerVariables["URL"].ToString(), kullaniciSicil, pcname, "", null);

        }
        catch (Exception ex)
        {
            System.Diagnostics.EventLog.WriteEntry("SemiCASE", "SemiCASE hata loga yazılırken hata oluştu! Hata: " + ex.Message);
        }
        finally
        {
            Response.Redirect("~/Hata/Hata.aspx");
        }
         * */
    }

    void Session_Start(object sender, EventArgs e)
    {
        // Code that runs when a new session is started

    }

    void Session_End(object sender, EventArgs e)
    {
        // Code that runs when a session ends. 
        // Note: The Session_End event is raised only when the sessionstate mode
        // is set to InProc in the Web.config file. If session mode is set to StateServer 
        // or SQLServer, the event is not raised.

    }
       
</script>

